import React from 'react'
import PropTypes from 'prop-types'

class Widget extends React.Component {
  static propTypes = {
    style: PropTypes.object.isRequired,
    children: PropTypes.element.isRequired
  }

  render() {
    return (
      <div className="widget" style={{ width: 100, height: 100, background: '#eee', position: 'relative', left: this.props.style.left, top: this.props.style.top }}>{this.props.children}</div>
    )
  }
}

export default Widget
